package com.lgl.scsheader.sameCityChart.controller;

import com.lgl.scsheader.base.controller.BaseController;
import com.lgl.scsheader.sameCityChart.service.OrderCityChartService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 订单城市统计图表
 */

@RestController
@RequestMapping(value="/orderCityChart")
public class OrderCityChartController extends BaseController{
	@Resource(name="orderCityChartService")
	private OrderCityChartService orderCityChartService;

    @RequestMapping(value = "/listHotCityOrderNumber")
    public Object listHotCityOrderNumber(){
        return orderCityChartService.listHotCityOrderNumber();
    }
    //获取热门城市总订单量
    @RequestMapping(value = "/listHotCityOrderTotal")
    public Object listHotCityOrderTotal(){
        return orderCityChartService.listHotCityOrderTotal();
    }
    //获取今年订单量最多的6座城市及其订单量、及这6座城市上一年的订单总量
    @RequestMapping(value = "/listMostOrderTotalCity")
    public Object listMostOrderTotalCity(){
        return orderCityChartService.listMostOrderTotalCity(getPageData());
    }
    //获取今年和去年订单量最多的6座城市及其订单量
    @RequestMapping(value = "/listMostOrderTotalByYear")
    public Object listMostOrderTotalByYear(){
        return orderCityChartService.listMostOrderTotalByYear(getPageData());
    }

}